<template>
    <div>
        <div style="overflow: auto; height: 100%; width: 100%" v-html="formHtml"></div>
    </div>
</template>

<script>
import {findFlowPrint} from "../../api/process";
export default {
    name: "GetFlowByQRCode",

    data() {
        return {
            form: '',
            guid: this.$route.params.guid
        }
    },
    mounted() {
        findFlowPrint(this.guid).then(res => {
            if ('SUCCESS' === res.status) {
                if (res.data != null && res.data != '') {
                    this.form = res.data
                } else {
                    this.form = '该流程尚未归档'
                }
            }
            else {
                this.form = '该流程尚未归档'
            }

        }
        )
    },
    computed: {
        formHtml() {
            return `
        <style>
                body { font-family: Arial, sans-serif; }
                table { border-collapse: collapse; width: 100%; }
                th, td { border: 1px solid #ddd; padding: 8px; }
                /* 添加更多样式以匹配 UEditor 的样式 */
            </style>
        ${this.form}
      `;
        },
    },
    methods: {
    }
}
</script>

<style scoped></style>